package com.onlinesshop.mall.pojo;

import java.io.Serializable;

/**
 *订单明细表
 */
public class OrderItem implements Serializable {
    private int id;     //主键id
    private int user_id;    //用户表id
    private int product_id; //商品表id
    private double price;      //生成订单时的商品价格
    private int quantity;       //商品数量
    private double total_price;    //商品总价
    private String create_time;    //创建时间
    private User user;              //用户
    private Product product;        //商品

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    public Product getProduct() {
        return product;
    }

    public String getCreate_time() {
        return create_time;
    }

    public void setCreate_time(String create_time) {
        this.create_time = create_time;
    }

    public void setProduct(Product product) {
        this.product = product;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getUser_id() {
        return user_id;
    }

    public void setUser_id(int user_id) {
        this.user_id = user_id;
    }

    public int getProduct_id() {
        return product_id;
    }

    public void setProduct_id(int product_id) {
        this.product_id = product_id;
    }

    public double getPrice() {
        return price;
    }

    public void setPrice(double price) {
        this.price = price;
    }

    public int getQuantity() {
        return quantity;
    }

    public void setQuantity(int quantity) {
        this.quantity = quantity;
    }

    public double getTotal_price() {
        return total_price;
    }

    public void setTotal_price(double total_price) {
        this.total_price = total_price;
    }

    @Override
    public String toString() {
        return "OrderItem{" +
                "id=" + id +
                ", user_id=" + user_id +
                ", product_id=" + product_id +
                ", price=" + price +
                ", quantity=" + quantity +
                ", total_price=" + total_price +
                ", create_time='" + create_time + '\'' +
                ", user=" + user +
                ", product=" + product +
                '}';
    }
}
